package com.niit.service.impl;

import com.niit.dao.DishMapper;
import com.niit.pojo.Dish;
import com.niit.service.DishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DishServiceImpl implements DishService {
    @Autowired
    private DishMapper dishMapper;

    @Override
    public List<Dish> getAllDishs() {
        return dishMapper.getAllDishs();
    }
    @Override
    public void addDish(Dish dish) {
        dishMapper.addDish(dish);
    }
    @Override
    public void editDish(Dish dish) {

        dishMapper.editDish(dish);
    }

    @Override
    public void deleteDish(String dishId) {
        dishMapper.deleteDish(dishId);
    }



    @Override
    public Dish getDishById(String window_id) {
        return dishMapper.getDishById(window_id);
    }

    @Override
    public List<Dish> getDishByWindowId(String window_id) {
        return dishMapper.getDishByWindowId(window_id);
    }
}
